#ifndef _ENGINE__H
#define _ENIGINE__H

#include "SDL/SDL.h"

/* Game engine created 16/2 - 2009 
   Game engine for Crazy Bubble 
   old remake of magical drop

   Engine design in documentation! =)
*/

// Grid/Matrix?

struct GridStruct {
  int x;
  int y;
};




// Ball class

class BallClass {
 public:
  void DrawBall(SDL_Surface* scrn);
  void Init();
  void RemoveBall(SDL_Surface* scrn);
  SDL_Surface* model;
  bool BreakAble;
  bool destroyed;
  bool exsist;
  int color; // 0 - Blue , 1 - Yellow 2- Test, - 3 - Green -4 Red
  GridStruct Location;
  GridStruct Position;
  void Free();
};

// Player Class

class PlayerClass {
 public:
  GridStruct Location;
  SDL_Surface* model;
  void Shoot();
  void Catch();
  void MoveLeft();
  void MoveRight();
  void Init();
  void Draw(SDL_Surface* scrn);
  void RemoveTrace(SDL_Surface* scrn);
  void setBallColor(int i);
  int getBallColor();
  int BallPos;
  void MoveToSurface(int locX);
  int Center;
  int BallColor; // 0 - Blue , 1 - Yellow 2- Test, - 3 - Green -4 Red
  int balls;
  bool gotBall;
};

// Event Handler

class EventHandler {
 public:
  void KeyPressed(char key);
  void HandleEvent(SDL_Event event);
};


// Score Handler


// Collision handler

// Math
int CenterOfBall(int BallX, SDL_Surface* src);

#endif
